package linestrategy

import (
	"codejy/analysis/lineanalysis"
	"codejy/globalfunc"
	"codejy/structdef"
)

// 类型实例化变量行为调用策略
/**
 *  a=new("type")
 *  a.method()
 */
type InstanceMethodStrategy struct {
}

// 注册策略
func init() {
	RegisterStrategy(&InstanceMethodStrategy{})
}

// 判断
func (f *InstanceMethodStrategy) getId() int {
	return lineanalysis.InstanceMethod
}

func (f *InstanceMethodStrategy) Execute(threadStore *structdef.ThreadStore) {
	content := threadStore.Code.LineContent
	globalfunc.ExecuteFunc("AssignmentStrategyMode", threadStore, content)
}
